package com.chen.Main;

import com.chen.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("UserBeans.xml");
        User user = (User)context.getBean("user");
        System.out.println(user.toString());
        System.out.println("========");
        User user1 = (User)context.getBean("user1");
        System.out.println(user1.toString());
    }

}
